import api from './auth';

// 获取用户评论列表
export const getUserComments = (params) => {
  return api.get('/comment/user', { params });
};

// 添加评论
export const addComment = (data) => {
  return api.post('/comment', data);
};

// 删除评论
export const deleteUserComment = (commentId) => {
  return api.delete(`/comment/${commentId}`);
};

// 获取景点评论列表
export const getAttractionComments = (attractionId, params) => {
  return api.get(`/comment/attraction/${attractionId}`, { params });
};

// 管理员获取所有评论
export const getAllComments = (params) => {
  return api.get('/comment/admin/list', { params });
};

// 管理员删除评论
export const deleteComment = (commentId) => {
  return api.delete(`/comment/admin/${commentId}`);
};

// 管理员审核评论
export const reviewComment = (commentId, status) => {
  return api.put(`/comment/admin/${commentId}/status`, { status });
}; 